<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
		<title>Chapter 1:demo 5</title>
		<!-- 顶点着色器和片元着色器代码 -->
		<script id="vertex-shader" type="x-shader/x-vertex">
			attribute vec4 aPosition;
			varying vec4 vColor ;
			attribute vec4 aColor ;
			void main(){
				gl_Position = aPosition;
				vColor = aColor ;
			}
		</script>
		<script id="fragment-shader" type="x-shader/x-fragment">
			precision mediump float;
			varying vec4 vColor;
			void main(){
				gl_FragColor = vColor ;
			}
		</script>
		<!-- <script id="fragment2-shader" type="x-shader/x-fragment">
			precision mediump float;
			varying vec4 fColor;
			void main(){
				gl_FragColor = vec4( 0, 0, 1.0, 1.0 );
			}
		</script> -->
		<!-- 一组相关的JS库 -->
		<script type="text/javascript" src="./jsfile/webgl-utils.js"></script>
		<script type="text/javascript" src="./jsfile/initShaders.js"></script>
		<!-- <script type="text/javascript" src="./glMatrix-0.9.5.min.js"></script> -->
		<!-- 绘制三角形的JS代码 -->
		<script type="text/javascript" src="./jsfile/color.js"></script>
	</head>
	<body>
		<canvas id="triangle-canvas"  width="500" height="500"></canvas>
	</body>
</html>